package com.woniuxy.listener;

import com.woniuxy.po.Mail;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author: 马宇航
 * @Do: 广播模式的订阅者
 * @DateTime: 22/07/06/0006 下午 4:18
 * @Component: 成都蜗牛学苑
 **/
@Component
public class SubscribeTwo {
    @RabbitListener(queues = "psQueue2",ackMode = "AUTO")
    public void subscribeMethod(Mail mail){
        System.out.println("订阅者党明接收到消息："+mail);
    }
}
